Script Sample

The following VBScript will access GMail Drive and copy one file on Windows XP. Save the script in a file with the .vbs file-extension and double-click to test it.

MYCOMPUTER = &H11

Set sa = CreateObject("Shell.Application")
Set myComputer = sa.NameSpace(MYCOMPUTER)

GmailPath=""

For Each fi in myComputer.Items
      If fi.Name="GMail Drive" then
            GmailPath=fi.Path
            Exit For
      End If
Next

If GmailPath="" Then
      wscript.echo "Could not find GMail Drive Path."
      wscript.quit
end if

Set myGmail = sa.NameSpace(GmailPath)
if myGmail is Nothing Then
      wscript.echo "Could not open Gmail Drive"
      wscript.quit
end if

wscript.echo "Will copy file: C:\Temp\Test.txt"

myGmail.CopyHere "C:\Temp\Test.txt", 0